import React from 'react'
import style from './Index.module.less'
import { Button } from 'antd'
import { confirmAction } from '@js/tool'

async function requestHandle () {

}

function Main ({ title, value, onChange, config = {} }) {
  return (
    <div className={style.container}>
      <Button type='primary' onClick={() => confirmAction(config.notice || `您确定要 ${title} 吗？`, () => requestHandle(value))}>{title}</Button>
    </div>
  )
}

export default Main
